/*
package com.wwy.monitor.config;

import com.alibaba.alipmc.api.ProcessInstanceService;
import com.alibaba.alipmc.api.ProcessRecordService;
import com.alibaba.alipmc.api.TaskService;

import com.aliexpress.boot.hsf.HsfProperties;
import com.taobao.hsf.app.api.util.HSFApiConsumerBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@EnableConfigurationProperties(HsfProperties.class)
public class AlipmcConfig {

    @Value("${spring.aliworkMc.hsf.version}")
    private String hsfVersion;
    @Value("${spring.hsf.group}")
    private String group;
    @Value("${spring.hsf.timeout}")
    private int timeout;

    @Bean
    public ProcessInstanceService createProcessInstanceService() throws Exception{
        HSFApiConsumerBean bean = new HSFApiConsumerBean();
        bean.setInterfaceName("com.alibaba.alipmc.api.ProcessInstanceService");
        bean.setVersion(hsfVersion);
        bean.setGroup(group);
        bean.setClientTimeout(timeout);
        bean.init(true);
        return (ProcessInstanceService) bean.getObject();
    }

    @Bean
    public ProcessRecordService createProcessRecordService() throws Exception{
        HSFApiConsumerBean bean = new HSFApiConsumerBean();
        bean.setInterfaceName("com.alibaba.alipmc.api.ProcessRecordService");
        bean.setVersion(hsfVersion);
        bean.setGroup(group);
        bean.setClientTimeout(timeout);
        bean.init(true);
        return (ProcessRecordService) bean.getObject();
    }

    @Bean
    public TaskService createTaskService() throws Exception{
        HSFApiConsumerBean bean = new HSFApiConsumerBean();
        bean.setInterfaceName("com.alibaba.alipmc.api.TaskService");
        bean.setVersion(hsfVersion);
        bean.setGroup(group);
        bean.setClientTimeout(timeout);
        bean.init(true);
        return (TaskService) bean.getObject();
    }
}*/
